﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Web;

namespace NetLib.web
{
    public class ParameterUtils
    {
        public static String EncodeURLParameter(Hashtable ht)
        {
            StringBuilder sb = new StringBuilder();

            foreach (String k in ht.Keys)
            {
                sb.Append(k);
                sb.Append("=");
                String v = (String)ht[k];
                v = HttpUtility.UrlEncode(v);
                sb.Append(v);
                sb.Append("&");
            }
            String r=sb.ToString();
            return r;
        }

    }
}
